﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HalconDotNet;
using MachineVision.Core.TemplateMatch.Shared;
#nullable disable
namespace MachineVision.Core.TemplateMatch
{
    public interface ITemplateMatchService
    {
        MatchResultSetting Setting { get; set; }
        ROIParameter Roi { get; set; }

        /// <summary>
        /// 模板匹配描述信息
        /// </summary>
        MethodInfo Info { get; set; }

        /// <summary>
        /// 创建模板
        /// </summary>
        /// <param name="hobject">生成模板指定区域的图像</param>
        /// <returns></returns>
        Task CreateTemplateAsync(HObject image, HObject hobject);

        /// <summary>
        /// 运行
        /// </summary>
        /// <param name="image"></param>
        void Run(HObject image);

        /// <summary>
        /// 获取执行时间
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        double GetRunTimeSpan(Action action);
    }
}
